fix some bugs...