Merge "PIP: Fix potential stuck state" into pi-dev