Bugfix in setOrientation()