Fix some problems with detecting the receiver.