Corrected encoding and Attribute removal issues