fix crash issue

Signed-off-by: Du, Changbin <changbin.du@gmail.com>