various hacks to fix random not-understood crashes