core: Fix msg_send_receive

Fixes #1935