Fixed a bug that adds duplicate host entries in the host history