fixes how data is passed to layouts so that context is used in layouts when rendered.