From Andreas Jacobs <andjac@kawo1.rwth-aachen.de>: bugfix for scheduler