fixed bug based on diameter of zero