Fixed writing length for some strings. Fixes #52