fixed behavior of alert view when showing in main view or from another modal view.