fix scheduler

- prioritization of thread was inverted