Hmm. Yes well, actualy you are a better coder then I am, and I didn't expected it to be so easy for finding solution to your problem. When I get home i'll try again although i'm not at your level of scripting yet.
Oh and I remember this problem with strings from some time ago when I tried working with chat script.