#85: fixed compile errors with bagging