Possible fix to app crashes on some devices