Fix for scheduler deamon mode