added fix for orientation change on devices