steadystate: check for division by zero in mean calculation