handling root correctly when rotating.