Fix Duplicate Entry for messages