slight fix in hostname func