guard against div by zero