The led3 code is the problem.
delay() does not work very well if you want to do more than one thing at a time.
use blink without delay for led3.
The "BLINK" program that is usually a beginners first sketch is written linearly:
Turn on LED;
Wait 1 second;
Turn off LED;
Wait 1 second;
Loop around and do it again.Notice that it takes 2 whole seconds for loop to go around once. and if you try to do anything else things will get messed up.
This is not a good programming technique because during the time it is waiting(delay) the arduino could be doing literally millions of other things.
It's better to take a reactionary approach like in the " Blink without delay" sketch:Loop;
Is it time yet (no);
Do other stuff;
Loop;
Is it time yet (no);
Do other stuff;
Loop;
Is it time yet (yes);
switch the LED;
Do other stuff;With this sketch loop will go around THOUSANDS of times per second. Lots of time to do other stuff