Fixed a bug in orders