fix crash in landscape mode