fixed buglet in getAllpeaks.R