Fix some issues with the detection.