hopefully fixed all sigsegv