Fix return code handling.