 Although "Goodbye, Farewell and Amen" was the final episode that  aired, the episode "As Time Goes By", which was the second last  episode that aired, was in fact the final episode filmed. Because  the ranch set had been destroyed by a brush fire, "As Time Goes By"  was filmed completely on the indoor sound stage set.