Fix url lookup because JS is no longer in tempalte