minor fix on javascript