Try to fix a bunch of crashes