pictoword: fix some bugs.