session memory leak workaround