Previous versions was having few scheduling bugs. This commit is specifically contains patches of such bugs.