Fix bug in Frasers code. Using barriers.