updated to fix string not ending with stringSeparator