fixed some bugs in the admin page