trying to fix transition flicker