fix syntax error in js