Crash fix for Huawei devices