minor tweaks to js