Loop infinito resolvido