Work in progress: debugging the scheduling loop...