fix bug in order