fixed toAscii method