small tweak to js