Fixes on generate_admin_class