Fixed blunder in JS code