fix rationalType->toComplex method