made form session logic backward compatible