Conditions don't work properly