Fixed bug in tasks.