fix refund bugs