Some minor fixes and workarounds regarding command and script widget