fixed thread_compare_priority