prevent crash loop