Do some changes and correct the code.

Signed-off-by: Zhao Yi Min <ym.zhao@qiansoon.com>