problem launching app from finish page
I am using NSIS 2.36

I have a finish page with 2 checkboxes. 1 for launching an app and 1 for launching a browser.

The app is launched using

!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION ExecAppFile

and the function looks like this

Function ExecAppFile
UAC::Exec '' '"$INSTDIR\App.exe"' '' ''
FunctionEnd

The browser is launched using

!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(CustomString)
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ExecWebFile


and the function looks like this

Function ExecWebFile
ExecShell "open" "$INSTDIR\website\webpage.html"
FunctionEnd

The problem is arbitrary behavior. When both checkboxes are checked on the finish page, the app is only launched sometimes. The browser is always launched. If the browser checkbox is not checked, the app is always launched. Any idea why this arbirary behavior occurs?