fixed flickering issue