Fix crash on airplane mode