Fixed crashing on some Android devices.