Updated superuser check code