Fixed bug in number of tasks.