Fixed the flickering issue.