Minor fix

A minor fix in JS, because of which other JS was breaking.