Feature/distance fix errors in variant support