Made extract_dht return length in case the caller needs such info