fixed possible critical bug with string operation