patching possible infinite loop