fixed bug when deleteing link messages