Fix bug with editing category