Revert "ODE-943: fixing a scheduler bug. Thanks Waruna for the patch."

This reverts commit 8cb723667d4221cef2bcbe818d03c635294132a1.