Bugfix when hostname is just a string