Fixed flickering issue