Fix possible crash on older devices.