Attempt to fix crashes.