fixed categories.js socket callbacks