Fixing memory barrier problems with O3