compilation fixes to JS files