I did some more testing and now the patch works and I haven't had any more crashes. The only difference is that before compiling I deleted the old .bcast folder. So that was where something was wrong. Sorry for wasting your time on my mistake.