Fixed syntax error in javascript