Added more debug statements to figure out if we're stuck in an infinite loop