fix gentrainmetrics