Fixing a few things on the scheduler source