fixed most of the problems with string parsing