update doc + several bug fixe