ensure that messages is an array
1.0.2