fix some bugs..