fix training script