Fix bugs in the admin tools library.