fix direction of message sorting