fixed weird error with messages not in an array