third attempt to fix crashes