Fix session creation bug