fix infinite loop in print_start