cleanup before tag