fixed category selection when editing