Fixing a few crashes in PNLogger