Fix various issues in admin_edit()