fixed segv in cstring.c, closes #18