A sentence from JapanesePod101.
We sat on the airplane for two hours before it took off.
The general meaning of the sentence is not in question, but is 離陸するまで modifying 座っていた or 二時間 (i.e. the two hours until the plane departed)? My instincts say it's the former, but that comma is throwing me off.