fixed error callback for dialog