session: fix for illegal sessions