fixing category delete bug