changed use of variable that should have been a constant