fix if last message does not exists