Fixed bug in parsing hosts