fix return to hresult