trying to fix random crashes