Fixed small bug in getHostIdentifier method

Fixes a small bug in `getHostIdentifier` that seemed to be causing the daemon to segfault occasionally.