Fixed bugs with rotation at root