bugfix when deleting tags