Fix frameDetecting