Broken logic for sccheduling