minor change to java script to ensure correct url is in place