Fixed duplicate adding problem