fix string encoding as per #100