minor fixes
keymgmt exception handling