Fixed rotation calculation in update function.