Fixed bug where pressing up/down on the keyboard to get the last message would put the text cursor at the beginning of the message