fixed foreign key issue on creating order