fixes to js