remove an infinite loop