Fix return values in the production code