Fixed division by zero bug in ratio methods.