Fix a couple of bugs in the deletion process of Main Tags