Bean flagged down the train with the danger signal; thinking the bridge was out, the train engineer stopped.
Bean flagged down the train with the danger signal. The bridge was out. This was what the train engineer was thinking. The train engineer stopped.