Every turret, except the tail, had a rotary mechanism that went from the stationary aircraft to the revolving turret. It carried power and signals to and from the turret. Part of the overall mechanism was an interrupter piece which opened the firing circuit when the guns were pointed at aircraft structure or props. It consisted of a metal outline of the props and the structure, on the turret side, and several micro switches, on the aircraft side. As the turret rotated, one or another of the micro switches would ride up on the metal outline and open the firing circuit, stopping the machine gun(s) from firing. The metal outline was specific to the location of each turret, all four were different. Note that in a cookoff situation, where the guns are firing in an uncontrolled manner, the firing interruption has no effect. So … to prevent the upper forward turret from shooting the upper gunner in his bubble, there is an arm and a roller on the front of the 4 gun turret (look for it in photos or videos), and there is a "collar" at the rear of the turret. As the turret rotates towards the tail, the arm and roller rides up on the collar and forces the elevation axis of the guns up and over the bubble and possibly the tail. The upper rear turret does not have any mechanism like this, so I assume a cookoff event is less likely there.