Hey @jipnet,
Unless Peter can recreate this on his test machine it will be very difficult if not impossible for him to fix.
What version of macOS are you using and what version of Keyboard Maestro?
Please also look in the Keyboard Maestro Engine log and post the entire error.
You can open the logs folder from the Keyboard Maestro Editor's Help menu, or you can use my macro:
Open the Keyboard Maestro Engine Log in the Console or BBEdit
-Chris