fix return status codes