starDesktop.terminate does not terminate/close Libre Office

I have an “Exit” button on my Libre Office 6.x Switchboard that calls the following macro (the_Exit):-

Sub the_Exit
REM      Close the switchboard
  call close_Switchboard() 
REM      Wait a bit
  wait 400
REM      Terminate LO
  starDesktop.terminate
End Sub

This works fine on LO 6.1.3.2 x64/Windows 8.1 Pro
In LO 6.1.2.1/Mac OSX 10.13.1 the Switchboard closes, BUT LO is still left running.

What can be done to make LO close down programmatically on the above Mac.
Thx.

Upgraded to LO 6.1.3.2 for Mac (Version: 6.1.3.2
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb), but problem still exists.

[Solved] Had an error (not syntax) in my coding and the error message-box was being hidden behind my Switchboard.
All working now.