Fixing JS method misspelling