Which sentence has a misplaced modifier?

Shelly stayed up all night studying for the history test that she had forgotten about.

Finally, at 3 a.m., Shelly turned out her light and tried to get some rest.

Rubbing her eyes, Shelly began answering the questions.

Shelly finally completed the last question yawning loudly.