clean up custom errors a bit