fix 2DHT bug, add test