improve hostname completion