Pub Sim: Crash Fix

Hi everyone and apologies for taking so long to fix this one, it was a real pain to find and especially over Christmas. However, with fingers crossed, we believe we got it. We've included a bunch of optimizations as wel…