fix some bugs and remove some packages