fixed the return value of loop-else when empty