Fix substitute's disappearing on position swap