fixes gray flash issue