Fixed bug in print_selected_pulses();