The following sentence contains an error in sentence structure. Choose the option that corrects the error:
Having studied all night long, the exam was completed by the students before the sun rose.