fix bugs, allow connecting to non local hosts, offsets