PIE aio patch (1/2)

All credit goes to PA