while pleasing to Riker's mind, the passionate dreams only worsen Riker's condition, as the virus feeds on the positive endorphins his brain is creating. Pulaski and Counselor Deanna Troi therefore agree to try to make the machine evoke negative dreams instead. Thus Riker dreams of Lieutenant Tasha Yar's death, and the apparent death of Deanna Troi's child. This has the desired effect, as the negative endorphins drive the virus away, but the endorphins are not strong enough. As a last resort, Pulaski uses the machine to evoke dreams of raw, primitive feelings of fear and survival. Thus Riker dreams of fighting the tar creature Armus, the alien-controlled Admiral Gregory Quinn, and the Klingon officer Klag on board the warship Pagh. Seeing that the raw emotions work best, Pulaski intensifies the dreams to come at a more rapid pace. This finally kills the virus and Riker recovers. Production The episode was intended to save money at the end of the season by being a bottle episode which featured few additional characters. The only guest star was Colm Meaney as recurring character Chief Miles O'Brien. The reason was that the show had overspent on the episodes "Elementary, Dear Data" and "Q Who", and Paramount Pictures was holding the series to their overall season budget. It was the last episode on which Maurice Hurley acted as head writer; he referred to the episode as a "piece of shit" and "terrible, just terrible". He turned in the idea of a cheap clip show to save money and wrote the first draft of the script, with Richard Manning and Hans Beimler conducting re-writes. Director Rob Bowman initially thought that the episode could be filmed in five days, two fewer than usual. However, it was actually filmed in three days after pressure from Paramount with two spent only on the sickbay set. He later said that he simply shot the framework for the clips to be added in later, and never saw a final cut of the episode. Production assistant Eric A. Stillwell was responsible for selecting the clips that went into the episode, with 21 different clips included. The prop used on Riker to fight the infection was created from drawings by designer Rick Sternbach. Ron Jones created the music for the episode, including a three note motif to represent the virus that infects Riker. Themes build as the episode progresses, with elements from "Infection