Fixed notice thrown in layout file