cape_sockets: fix socket index