fixed nullpointer i newappointmentview