Scoping fixes for PE3