Fix crash on start for some devices.