fix for bug in string overwrite