Fix anonymous function in extension.js