fixed a major bug in admin_portal