fixed bug in order