minor fixes for training