Refactored/fixed initial value setting.