implement correct handling of selections when messages arrive