fix issue about the loop prompt