Fixed barrier bug