Fix a bug when remove key if user was root