fix bug for checking admin on admin pages