js fixes and other fixes