Fix to prevent potential divide by zero bug during initialization.