fix to dismiss_modal