Fixing incorrect comparison