Fixed validation for new appointments, which was crashing the program