fixing issue with duplicated vector entries