trying to fix crashes