fix some bugs!