Fix syntax error in javascript