fixed comparison error