Fixed empty categories not removing themselves correctly on edit().