Fixed a session creation bug