Fixed prerender cleanup