Fix insert data bug.
Add doc function.