fix some bugs, add localization