Fix some bugs for release.

Fix bugs and docs.