some bugs correction