even more fixes!
Another rounds of fixes.
fixed basechar duplication.