Fix for partial hostname peeking

Fix for issue #74, w/ unit tests.