Fix crash on some devices