fix bug in edit category