Fixed synchronization with msg.send