Dialog doesn't come into focus

Guys,
I have a piece of code I’m struggling with. I have an app where a dialog(1) pops up with three buttons: {Help, Add, Subtract} . When user taps the Help button, a second dialog should popup replacing dialog 1, displaying information about the app.This dialog will have a {Cancel,Continue} button. When user taps the Continue button, he should be returned to the previous dialog 1( The dialog with three buttons: {Help, Add, Subtract}).
The issue is that when I tap the ‘Help’ button, dialog2 doesn’t come into focus and the app icon keeps bouncing in the dock. When I click the app icon in the dock, then the dialog2 comes into focus. Any idea how I can get rid of this issue?
Here is my code:

on run
tell application "Finder"
set fileOpen to "Macintosh HD:Users:username:Desktop:Test.rtf" as alias
set filecontents to read fileOpen
repeat
set question to display dialog "I want to " buttons {"Help", "Add", "Subtract"} default button 2 
			set response to button returned of question
			if response is equal to "Help" then
				Help() of me
			else
				exit repeat
			end if
		end repeat

#Here is my Help Function

 on Help()
   display dialog "blah blah" buttons {"Cancel", "Continue"}
 return
end Help

 end tell
end run

You do not need to use tell app “Finder” in this script. Also, on run is a handler. You can’t put one handler inside another, so your help handler (function) must go outside it.

on run
	
	set fileOpen to "Macintosh HD:Users:username:Desktop:Test.rtf" as alias
	set filecontents to read fileOpen
	
	repeat
		set question to display dialog "I want to " buttons {"Help", "Add", "Subtract"} default button 2
		set response to button returned of question
		if response is equal to "Help" then
			helpDialog()
		else
			exit repeat
		end if
	end repeat
	
end run

#Here is my Help Function
on helpDialog()
	display dialog "blah blah" buttons {"Cancel", "Continue"}
	return
end helpDialog

If in your code you do access other applications (like the Finder) and you continue to find that your dialogs are not coming to the front there’s an easy solution. You can always tell the script to activate and display the dialog…

on helpDialog()
	tell me
		activate
		display dialog "blah blah" buttons {"Cancel", "Continue"}
	end tell
end helpDialog

that did the trick. Thanks !!!