Hendrick Motorsports has perfect finish to 40th anniversary race