Fix js in templates