fixed bugs in tasks