Fix a memor yleak/infinite jumping