Script keeps crashing Mail

Hi,

I knocked up this simple script which does three things:

  1. Clears any flag from the highlighted email in Mail (5.0, running in Lion, 10.7)
  2. Moves the email to the Archive folder for the relevant email account
  3. Selects the email below the email that has just been archived
tell application "System Events"
	
	tell process "Mail"
		tell menu bar 1
			tell menu bar item "Message"
				tell menu "Message"
					tell menu item "Flag"
						tell menu "Flag"
							click menu item "Clear Flag"
						end tell
					end tell
					click menu item "Archive"
				end tell
			end tell
		end tell
	end tell
	
	keystroke (key code 125)
	
end tell

The problem is that about every other time I run the script it crashes Mail, seemingly at the point that it is performing the keystroke.

Does anyone have any idea why and what I could do to solve the issue?

Thanks,

Nick

maybe the code is happening to fast, so possibly a small delay may help, cant test properly as I am still on SL

delay 0.2
	keystroke (key code 125)