properly delete tasks from the db