Decrement barrier_count before storing to hold value

Fixes #1