EV3 color sensor strangeness
Perhaps you need to add some hysteresis in your sensor loops. Each loop waits for a condition to be met, but then repeats infinity as long as that condition is met. Hysteresis means waiting for another condition to indicate that the sensor has returned to the original state and usually includes a deadband (meaning the positive trigger is not the same as the negative trigger) to filter out noise.

For example, wait for the color sensor to detect black again before repeating the loop with a deadband of 10%: