finish error case