Fixed bugs in admin pages