bug in session creation