fixed orderbypriority bug