Fix complex math type inference