improved parser string handling