fix for /refund endpoint bug