Fix bug in training_flag<- methods.