Fix JavaScript typo.
Fix tests.