Fixes bug when there are no tasks