fixed flickering at page load by delaying page render until document is ready.