fixed several duplication issues