Fixed: when a task is removed, the focus should be in the previous task