Ending on a specific Form

Let’s say I have the form: start.
On the form: start I have a button with method:

applicationFormInDialog(forms.form2,-1,-1,200,500);

This opens form2 in a Dialog. So far so good.
On this form I have a button with method:

forms.form3.controller.show();
application.closeFormDialog();

As far as I can tell, the solution must go the form3 and closes the Dialog.
It does close the dialog, but form3 blinks for 1 second and than goes back to form: start. Somehow a method returns automaticly back to the form where it is started. Is this a bug, or am I doing something wrong?

try closing your dialog first before going to another form:

application.closeFormDialog();
forms.form3.controller.show();

Yes! that did the trick!
Thanks.