fixed error in assignment to variable