Fix issue switching from potrait to landscape orientation