fixing bugs in orders flow