session: fix #688