Compensating for water quality changes