fix bug and doc