attempts to fix a bug when orders table is empty
fixes the nil class Order History bug