Corrected min image distance calculation