Fix encounter bug

Signed-off-by: jianmingyong <jianming1993@gmail.com>