Thank you Mike,
I am trying to keep parts count to a minimum. I could use an OR gate but that is another chip. I forgot to change the chip families to both HC, as suggested by audioguru, as was R6 also suggested. I want a simple battery operated electric lock to make a motor forward and reverse only stoping when the lock is locked or unlocked. For now, U is a momentary push button. B and C are phototransistors. Maybe I will switch to Light Sensitive Resistors. No, I don't want to drive 50 ohms. I want to use as little as power as possible for the circuitry. All the power should be used only when motor is on, and very little when it is stopped. Thanks for the help.