fixes bug when modifying the category of a topic but cancelling the edit