<=5.12 compaible fix for the for(;;) issue