fixed some bugs in admin