Added barriers correctly
Combined conditions
Merge pull request #1465 from Masy98/blocks

Added barriers correctly