fix some bugs.

Signed-off-by: shadberry <shadberry89@gmail.com>