exit error fixes