fix non-null category bug