some bugs fixed;