changed session to match htmlbuffer constructor