fix offsets and rotations