code to prevent invalid administrators