issue #168 uncovered a memory error