fix return codes