deal with messages defined in different scopes