Added assertions to session creation