Minor fixes to js output