Fixed a crash on tablets