Fix bounds rotation logic am: 781240d9bb
am: 7778de938a

Change-Id: I63e892677234e6b79f2d9dc3f2aa8729da46561e