fix up session allocation in the pyramid code