A care home has been told to pay fines and costs totalling £68,000 after the death of an 89-year-old resident.
Rosalind James was found slumped between the edge of her bed and collapsed bed rails at St George's Park Centre, Telford, Shropshire, in 2005.
The rails were the wrong type and had not been fitted properly, Shrewsbury Crown Court heard.
Southern Cross Healthcare admitted failing to protect patients from health and safety risks.
In a statement after the case, it said systems are in place to prevent it happening again.
A post-mortem examination showed the woman's neck had been compressed by the rail, but that she had died from a stroke, which could have been caused by other factors.
Speaking after the case the HSE said: "This tragedy could have been prevented if the correct type of bed rails had been fitted."
Southern Cross Healthcare said it inherited the prosecution from the former owners Ashbourne Ltd.