Fix crash in devices without external storage