Fixed bug in adapter returning NoneType for session handler