A few changes that make the rotation finally work properly