Fixed a bug in admin mode