Fix bug when accessing data in top-level message