Updated to work with latest CHM_train.