fixed data generation bug