fixing scheduler