Fixed bug in order