Added support for Orientation changes.