Fix kadmin crash and remove dead code

The dead code was noticed while doing research to confirm that the crash fix was correct.