fixed bugs with getTask