fixed attr_accessor for unit