Fix startup crash with PE

Fixes #232