Moved this from CreateCommand.