correcting scheduling bugs