loads js, but js is unable to load templates