patches remove_tag method to be more reliable