some bugs fixed

some bugs fixed