Fix error when creating commands.