fixed bug when gen label for training