removed trailing slash in js