Added another error handler for modal dialog