Fix flixker after switch