Fixed bug in create session