trying to fix crashes of example