Fixed bug when fetch last message.