Fix broken placement of boolean operations
Two minor fixes