fixed syntax error in js