fixed some syntax

Signed-off-by: fraserxu <xvfeng123@gmail.com>
merged a bug from original repo

Signed-off-by: fraserxu <xvfeng123@gmail.com>