fix bugs

./autogen.sh && configure && make

Signed-off-by: Dong Yuan <yuandong1222@gmail.com>