debugging some ratio bugs