prevent flicker on page load