fix FrameDetector::clipFrame