Not sure why this is happening, since I haven't a clue how to you are getting the player objects. However, if you take a reference to the
e.g. what is commonly done is this:
// Put all the player objects at the START OF THE MISSION into the global array, 'players'.
players = [p1, p2, p3, p4];
When the first player respawns, then the first element of players array will be first dead (corpse object), then null (corpse disappears). This is because you are recording the initial objects, not the objects as they are when you want to actually use them. Instead you should record them just before you want to use them:
// Put all the player objects, at this VERY MOMENT into the global array, 'players'
players = [p1, p2, p3, p4];
... update the GUI ...