Fixed training set builder.