Bugfix Invalid argument supplied for foreach()

when no Widget selected
Fix #59