I have an infinite loop somewhere