bugfix:close the session after use it