Fixed some scheduler issues