Updated page loading to fix flickers in style changes