Fix up grammatical flaws in the following sentence.
If the elevator was closed, then it can't be opened until the next morning because the control room was very far from that building.
If the elevator was closed, then it couldn't be opened until the next morning because the control room was very far from that building.