Heineman was first to notice a small warp drive power fluctuation, and at Scott's request, plotted a trend graph revealing that it would become disastrous within 40 hours. Heineman was left in charge while Scott described the circumstances to James T. Kirk and Spock. As the warp engines were shut down, Heineman and Scott dismantled the inner shell of the dilithium crystal matrix, discovering a flawed crystal.
While the ship was disabled, they were hit by an ion storm, the first time Heineman had ever experienced one. After the crisis was over, when Scott retired for the evening, he left Heineman in charge of engineering. (TOS - Star Trek II Short Stories short story: "To Wherever")