Fix crash when loading extensions.