Solved a bug where the layout controller context is not passed to the layout