fix some bugs ...