Hm, so I guess this is due to different refresh rates? Anyway, adding a mode only if it's not already in the list is preferable rather than removing duplicate entries afterwards.
By the way, you can find a complete implementation here (that ignores the duplicates):
http://burks.brighton.ac.uk/burks/la...s/fullscrn.htm