Fix NAG detection.