Fix creating new message when messages is null