Changed debug to print_r