Fix crashes on some Samsung devices (hopefully...)