Avoid crashing an app