Fix the bugs from Winnie

Signed-off-by: YC Huang <yingchauhuang@gmail.com>