avoid extra atom at the end of the targets list

The fix makes xsel compatible with Java programs: that extra atom causes them to fail with "Atom was 0. java.lang.NullPointerException: Failed to retrieve atom name" error.