KevinHuSh
refine code to prevent exception (#1231)
0de1478