fix unable to close modal window after error display