Fix index for stack plugin