fixes few bugs in admin.