Fix a couple bugs in the core extension.