Fix errors in PyFlowsScheduler.