Fix little syntax errors in js