fixed bug: wasn't setting flags on the command in the shell state