Core/ShellCommand: bugfixes