Edit categories bug fix