Fixed reading of attribute values

Should not be doing integer division, which cuts off the fractional
part.

Also initialize and reset the attribute and correction points.