Moved location of admin check