Fix crash on tablets