Fixed session saving to prevent unnecessary new sessions
Merge branch 'feature/session-rewrites'