fix bug when calling $.ui.hideModal when no modal window was shown.