Another attempt to fix the double message issue.