fix logic for finding first/last player