fixing the labels generation
merged