Fixed a bug that check permission cause crash on admin engine