Fix Rx scheduling of received messages by closing resources appropriately and dispatching messages back to UI thread.