fix bug that overrwirte barrels