moved notice and error to layout