fixed getTask function

ListTasks were returned multiple times when calling getTask function