cleanup error handling so we don't return multiple