Fix issues with close modal.