Fixed the document.ready addEventListener issue.