Added code to truncate peaks using half.width