[fix] use host over hostname if it exists.