Man was crushed to death at DHL depot in Milton Keynes
The potential danger to staff at a DHL depot where a worker was crushed to death was "blindingly obvious", a judge has said.
Krzysztof Sontowski, 36, died after his head and torso were trapped by a lorry at the site in Milton Keynes, Buckinghamshire in February 2015.
The courier company last year admitted two breaches of the Health and Safety at Work Act.
The case at Aylesbury Crown Court has been adjourned.
The court heard Mr Sontowski helped unload large goods lorries at the depot.
Vehicles would reverse back and link up with a load leveller, which safely distributes the weight of the lorry, but the court heard that sometimes the back of the vehicles would get stuck.
When this happened, the driver would rock the vehicle back and forth to set it free.
On the day he died, Mr Sontowski was at the rear of a vehicle and appeared to be trying to get the driver's attention in the wing mirror.
The court heard he looked round and became trapped between the lorry and the loading bay.
'Flaw in system'
Prosecutor Ben Mills said an accident was "waiting to happen" at the site.
The court heard the risks associated with lorries becoming stuck had not been properly assessed and that staff had come up with their own ways of fixing problems when machinery failed.
Judge Francis Sheridan described DHL as "good employers" and said "a substantial amount of equipment has gone into protecting everybody".
But he went on to say there was a "flaw in the system that was not picked up" and that the potential danger to staff was "blindingly obvious".
The defence team for DHL said there was a light system in place to inform the driver when it was safe to move.
The case has been adjourned until 30 April for sentencing.