fix a bug in string engine.