Fix match_ratio for convert to int