Fix crash on API8 devices