Fix the bugs around creating new appointment.