Fixed the category resetting to 0 when editing