Fix for tag counting