Changed prerender2 method, fixed layout issue