Added domReady to fix before DOM load templates error