Fixing tag checking and adding trace info