fix js loading and localize js references