fixed crashing in landscape mode