fix isRatio and ->ratio procedure bugs