Fix bug with fail handler.