Empty elements in the list are giving bogus results