fix build errors and the scheduling policy setting