some bugs fixed again