Fix bugs.

Signed-off-by: Geidivan <geidivan@gmail.com>