Fixed a bug in TestAdmin