Slight adjustment to hostname replacement