Fix tasks completing during scheduling cycle