Fix error generating statistics packet
Fix error generating statistics packet

If an algorithm throws an exception immediately from OnData, another error is thrown:
Error generating statistics packet:  System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

AlexCatarino/Lean,jameschch/Lean,kaffeebrauer/Lean,AnshulYADAV007/Lean,AnshulYADAV007/Lean,StefanoRaggi/Lean,young-zhang/Lean,jameschch/Lean,andrewhart098/Lean,StefanoRaggi/Lean,Jay-Jay-D/LeanSTP,Mendelone/forex_trading,Mendelone/forex_trading,QuantConnect/Lean,StefanoRaggi/Lean,StefanoRaggi/Lean,young-zhang/Lean,QuantConnect/Lean,Mendelone/forex_trading,JKarathiya/Lean,redmeros/Lean,kaffeebrauer/Lean,AlexCatarino/Lean,Mendelone/forex_trading,JKarathiya/Lean,Jay-Jay-D/LeanSTP,Jay-Jay-D/LeanSTP,AlexCatarino/Lean,StefanoRaggi/Lean,redmeros/Lean,QuantConnect/Lean,Jay-Jay-D/LeanSTP,redmeros/Lean,andrewhart098/Lean,JKarathiya/Lean,kaffeebrauer/Lean,JKarathiya/Lean,kaffeebrauer/Lean,jameschch/Lean,Jay-Jay-D/LeanSTP,QuantConnect/Lean,AnshulYADAV007/Lean,AlexCatarino/Lean,AnshulYADAV007/Lean,AnshulYADAV007/Lean,jameschch/Lean,young-zhang/Lean,young-zhang/Lean,redmeros/Lean,andrewhart098/Lean,kaffeebrauer/Lean,andrewhart098/Lean,jameschch/Lean