bugs in the equidistant grid code