The Fifth Doctor's first story was originally intended to be the four-part "Project Zeta Sigma", written by John Flanagan & Andrew McCulloch, who had previously scripted "Meglos". It was not intended to follow on directly from the events of "Logopolis"; instead, the Doctor and his companions would have already left Earth. The story was to concern nuclear disarmament. Commissioned as "Project '4G'" on 7 October 1980, the script proved unworkable, and producer John Nathan-Turner dropped the story on 19 February 1981. He then commissioned recently departed script editor Christopher H. Bidmead to write a replacement which became "Castrovalva". This last minute change disrupted the shooting schedule, meaning that "Castrovalva" would be the fourth serial of the series filmed, though it would be the first transmitted.