fix bug on delete appointment and then refresh the page