Fix bug when click to see messages but the clicked element was actually a span element and not the link itself