You are probably using the incorrect index for the extraction of the contact status. A simple way to confirm this, and to find out the correct index, is to add this snippet of code somewhere in the routine:
You are probably using the incorrect index for the extraction of the contact status. A simple way to confirm this, and to find out the correct index, is to add this snippet of code somewhere in the routine: