Fix an error in compiling code (bad error return way)