Not sure what this loop is checking? (Could at least use a comment.)