Fixed encoding issues with tags