[debug] some bugs fixed