Fixed writing of interrupted strings