Fixed scheduler
General fixes