Corrected peak_extraction script