Attempt at fixing a crash.