Fixes to javascript files