fix broken tables caused by incorrectly calculated unicode string length