fixing errors
modalInstance worked on