Fix errors with messages structure