Add when to call method invalidatePosition