merged in functional changes from jonnyzzz/PE
the only one i could find is this one verifying eof is not reached
https://github.com/jonnyzzz/PE/commit/f59329310914b97299d5517122b0cdd4ee2217b9