Made pe.py conform to recent changes to make it not broken