Pressing the "X" button does not delete the message, it just closes the window and saves the message for later viewing (and even though you have read the message on screen, it will still show up as being unread).
I suspect you may have your default SMS settings configured incorrectly.
Try the steps that I posted
here and let me know what happens.