fix delete bug
big changes, publish task function