fix priority comparison in sched_switch