Patches by madfish73 for detecting tag removal