Which sentence contains a dangling modifier?
a. Upon bestowing the awards, the mayor congratulated all the participants.
b. Upon hearing the fire engines, the apartment building was evacuated.
c. When operating heavy machinery, one must use caution.
d. Upon taking the field, the player was hit by a foul ball.