Fixed a flashing bug on load