fixing write rc in connect event