Added handling for landscape orientation