fixed some scheduling algorithm