Conditions doesn't work correctly