Added minpeakdistance