fix duplicate positions