fixed a few bugs

Signed-off-by: TomWu <myphpframe@163.com>