Remove sys.exit when unknown host and add avoiding zero divide.