fix issue with multiple records duplicating or not being where they should be