modified the edit category api for fixing bug