Revert "Revert "Fix glitch when user change orientation""

This reverts commit 87cb4d8cd9c54caed94f72ac3d3895bdb3e4c9b5.