fix classify function bug