Undefined Index fix and admin registration fix