fix wrong message emitted
merge socket communication with maps