bugfixes in string handling