bugfix for scheduler