fix order direction problem