fix div by zero in average_uptime_by_ip()