Applescript bug in hazel?

i use a tip from the forum and first run an applescript to set the folder and not the file.
then i run another applescript.
tell application "Finder"
set folder_list to name of folders of folder (theFile)
this does not work either
set folder_list to name of folders of folder ("Drive:folder:")
i just get an error beep and the rest of the applescript fails.
this runs fine outside of hazel.
any ideas?
then i run another applescript.
tell application "Finder"
set folder_list to name of folders of folder (theFile)
this does not work either
set folder_list to name of folders of folder ("Drive:folder:")
i just get an error beep and the rest of the applescript fails.
this runs fine outside of hazel.
any ideas?