Fixed bug with category reset when choosing 'Edit'