Fixed issue(s) with key replacement, and with NotFoundException not being caught.