minor tweek to js