Fix empty category bug