Conditional field is not working correctly