Fix return code mistakes