fix memory leak in hilbert map