fix return code