Hi - thanks very much for finding this and posting. This issue was still present in the Castra Prime fork that I created, but I have applied your fix to my latest version 0.8.0, posted earlier today.
If you find any other issues, please feel free to post here further or if you like, open a PR on github. Crash issues like this are my highest priority to fix.
Thank you!