Police have been criticised for the way they dealt with a 999 call for help from a man who was later found dead.
There was a "significant failing" in the way officers handled events leading up to the death in Edinburgh last year, the Police Investigations and Review Commissioner (PIRC) found.
The commissioner, Professor John McNeill, criticised the police after neighbours reported the man missing on March 26, stating he was under threat from a local drug dealer.
The 52-year-old was known to police as a vulnerable person with serious health and alcohol misuse problems.
He made a 999 call three days later to tell police he was dying and asked for help, hours before his body was found at the home of a friend.
It was made from a mobile in the Restalrig area, but area control-room staff sent officers to the man's own home 2.7 miles away in West Pilton, the report found.
When the missing person report and 999 call were later linked, a recording error meant police were sent to the wrong address in Restalrig, where they left a calling card.
The man was found dead at 8.15am that day at a house next door.
Mr McNeill has made several recommendations to Police Scotland, calling on the force to review the management of missing person inquiries in the Edinburgh division.
The case should have been categorised as a missing person inquiry from the outset and officers should have forced entry to the man's house to establish whether he was there, he said.
Mr McNeill said: "The lack of prompt action to trace the man and obtain medical intervention was a significant failing. The decision to downgrade the 999 call was clearly erroneous."
A force spokesman said: "We will study all the evidence provided by PIRC and note that a number of recommendations, which includes examining the actions of officers and staff, are specified."