added support for \0 in strings