Fixed to work with player numbers starting at 0, not 1.