update Native Session function

fixed native session function's bug