Fix crash when renaming a category, clicking "Apply", renaming it again and clicking "Apply" again.