a bunch of hacks to make prerenderer "work"