fixed issue with sessions not always being created