Fixing scheduler issue