Fix border flash bug on page load