Switched bagging implementation to a proper mask.