fixing bug on cleanString() method (see issue #244)