Fix some bugs in Voronoi functions.