Fixes to js