Make task positioning work when task is deleted