Moved the result check back to stop a false error