fix train procedure