fixed comparison mistake