fix js file to deal with new version linking correctly