fixed bug in fixTaskData()