cmath fixes