added write countrt to socket (prevents from sending empty msg)
id-rewritting in manager