fixed flash errors, make sure to render with layout false