Further simplify dock detection.