Fixed bug related to orientation.