fix task deletion with dependencies