minor fix to js