This also fixes a bug that caused the initial value for each attribute to be wrong if the default unit didn't match the unit used internally.