bugfix for crash when adding a new patient.