fixed error in isSourceHost func