fixed broken getUserOrders function