fix tests

hostname field was not being handled properly before