Bug fixes on train and predict options