Fixed bug preventing confirm dialogs from being hidden on cancel