critical crash/loop fix