minor fix on js