Fixed error in production with category deletion