fixed a bug when tasks are calculated too fast