Try and fix an infinite loop?