updatePosition removing last element