minor fix in js