fixes rounding errors in fees and valueout