FIXED: bugs for message view

Found and fixed a bug with opening message view, and found and fixed a bug for exchanging keys in message view.