Fix looping issue, add debug info