correct unexpected errors