Remove debug code in admin_edit() and fix error