Remove weird infinite loop