Fix infinite #each block execution