Minor fix on javascript for issue #4