Fixed flickering issues