Refixing infinite loop