Fix bug in orders