Fix white flicker on page change; fix modal out flicker