improved robustness of best_fit_cylinder function