This is fishy. I believe you should be able to get the names that do not contain trailing whitespaces. I've memories of doing that some time in the past. Let's see if @dragos has hints :)