tidy some exiting errors