Fixed the double render issue.