Fixes tag replacement