removed trailing slash in js when loading page