fix removal of untraining characters