Added fix for support of upSideDown orientation