changed for correct prerendering of pages