Fix nullpointer when revoking keys