Added correction for poorly formed attributes