Fixed JavaScript syntax checks