Fixed flickering problem