Indesign to PDF Revisited

I know I’ve posted this before but I’m pulling my hair out on this one.
I’ve been working on this script to create single page PDF’s out of Indesign CS3.
It works great until I section the document, then the script creates a PDF with all pages in one document.
Any ideas out there…

Thank Again

tell application "Adobe InDesign CS3"
	tell (active document) to set {file_name, doc_pages, page_numbers} to {name, pages, name of pages}
	set pdf_style to name of PDF export presets
	set export_style to (choose from list pdf_style with prompt "Select PDF Export Preset") as string
	if export_style is "false" then return
	set folder_path to (choose folder with prompt "Select folder to Save PDF files") as string
	set oldPref to page numbering of general preferences
	set page numbering of general preferences to absolute
	set pagesToPrint to (choose from list page_numbers with prompt "Choose Pages to PDF" with multiple selections allowed)
	if pagesToPrint is false then return
	repeat with anItem in pagesToPrint
		if length of anItem is 4 then
			set new_number to contents of anItem
			set new_number to text -3 thru -1 of ("00" & anItem)
		end if
		set PDF_name to folder_path & file_name & "_" & new_number & ".pdf"
		set page range of PDF export preferences to (anItem as string)
		tell active document to export format PDF type to PDF_name using export_style without showing options
	end repeat
	set page numbering of general preferences to oldPref
	display dialog "Your PDFs are Done" buttons {"Done"} default button 1
end tell