check if list is empty before calling REMOVE_DUBLICATES
syntax fix for VS2010 (maybe others, too)
fixed: win compile errors