Added a hack so that the selector index for the same remote host is always the same