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

Meta: [Editing a topic title and canceling the edit](http://meta.discourse.org/t/editing-a-topic-title-and-canceling-the-edit/4722)