Bug fix: handle boolean correctly in generic.bagging