small bug in ratio