This is broken. ``messages`` can be an array here