Fixed bug in clearChars