fix some bugs and recommit