Fixed issue with Bagging