Fixed bug where modal would display incorrectly when presented and the device orientation is changed.