fix crash related to tablet layout