Fix the modal close call