fixing TaskManager one bug at a time