Fix oops in handle ERR check