fix bug in duplicate dou detection