Conditions not working on some fields