ScanSetup: simplify some code to stop the PIP before scan

The same can be performed on more places where this is done