Bug-fix: If the remaining chars is zero, retry