Bug fixes on print_list