fixes and remove duplicates