fix race condition / timing issue on the internal message map