Hide the modal the 'proper' way