Fixed minor bug in data generator