Fix a few small (but critical) errors that crept in while pulling this out of the Aralarinda codebase