Fix skipping last host matched