Fixed error when saving demographics and closing dialog for patient portal users.