minimal fixes to make the extension to work