Fixed remaining TeraMath issues