Barrier error refactor - now barrier works