Fixes for installing as an extension