[FIX] fixed the endless loop