fix bug in view key encoding of strings