[UPDATE] fix some bugs