fixing more bugs in new session handling