Fixed bug: new category isn't added until refresh