fixed some bugs, and we now support unicode