solved flicker problem