Fix #49 stringmap segfault

This should fix issue #49. See the discussion there.