Why bells used to be attached to 19th century coffins

Coffins were sometimes found with unsettling scratch marks lining the inside. By the 19th century, a more scientific approach to such problems led to the realization that those declared dead were sometimes just still alive. And ingenious engineering solutions were devised: the safety coffins.

Bells were installed above ground outside of coffins. A thin rope, attached to the bell, would be run underground and through a hole into the coffin. This way, the dead could ring the bell in case they suddenly woke up. Bell or not, what a rude awakening that had to be! 

Video emerges of woman found alive in coffin
Woman found alive in coffin during own wake definitely dead this time
74-year-old 'dead' woman found alive in funeral home