Added more robust ControlParameter detection.