many bug fixed for automatic test.

Signed-off-by: Daogang Tang <daogangtang@gmail.com>