Fix some error about session.