The Alternative Factor - S1-E28
Plot hole: Kirk knows that Lazarus is insane and that he wants the Enterprise dilithium crystals. Yet he's not restrained in sickbay and is, in fact, given free run of the ship so that he can knock out the crew in engineering and steal the crystals. Other than to further a woefully weak plotline, this makes no sense whatsoever.
Answer: After causing Norman to overload, all of the other androids shut down. The same could be said for the androids on the Enterprise.