fixed 677cc719af21f53f0cc4da6a4db43c1ecab1900b which could cause an endless loop