clean up error block