fix issue #1, do not allow \0 in key string.